﻿Friend Class ComparerName
    Implements IComparer(Of TreeNodes)

    Public Function Compare(x As TreeNodes, y As TreeNodes) As Integer Implements System.Collections.Generic.IComparer(Of TreeNodes).Compare
        If x Is Nothing Then
            If y Is Nothing Then
                Return 0
            Else
                Return -1
            End If
        Else
            If y Is Nothing Then
                Return 1
            Else
                Return x.Name.CompareTo(y.Name)
            End If
        End If
    End Function

End Class
